<!DOCTYPE html>
<html lang="zh-Hans-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="author" content="zhz">
    <meta name="time" content="2022/1/21">
    <title>好友</title>
    <link href="/static/img/favicon.ico" rel="shortcut icon">
    <link href="../../static/css/bootstrap/bootstrap.min.css" rel="stylesheet">
    <link href="../../static/css/my/common/default.css" rel="stylesheet">
    <link href="../../static/css/my/common/header.css" rel="stylesheet">
    <link href="../../static/css/my/friend.css" rel="stylesheet">
    <link href="../../static/css/my/common/modal.css" rel="stylesheet">
</head>
<body>

<div class="myContainer">
    <div th:replace="~{common/header}"></div>
    <main id="main" class="w-100 d-flex justify-content-center align-items-center">
        <div class="userListAndSearchArea d-flex">
            <div class="userList list-group overflow-auto">
                <div th:each="friend:${friends}" class="d-flex align-items-center friend">
                    <img th:src="${#strings.substringAfter(friend.key,'_')}" onclick="$(this).next().click()"
                         class="rounded-circle" alt="" width="30" height="30">
                    <button onclick="showUserFriendProfile(this)" class="list-group-item list-group-item-action"
                            th:value="${#strings.substringBefore(friend.key,'_')}"><span
                            th:text="${friend.value}"></span></button>
                </div>
            </div>
            <div class="searchArea">
                <label for="username"></label>
                <input id="username" class="form-control" type="text" placeholder="输入用户名搜索/添加">
                <button id="searchBtn" onclick="searchUserByUsername()" class="btn btn-primary">搜索</button>
            </div>
        </div>
    </main>
</div>

<div th:replace="~{common/modal::noticeModal}"></div>

<script src="../../static/js/bootstrap/bootstrap.bundle.min.js"></script>
<script src="../../static/js/jquery/jquery-3.6.0.min.js"></script>
<script src="../../static/js/my/common/noticeModal.js"></script>
<script src="../../static/js/my/common/header.js"></script>
<script src="../../static/js/my/friend.js"></script>
<script src="../../static/js/other/background.js"></script>
</body>
</html>